﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;

namespace Helper.Models
{
    public class SubjectModel : ModelBase
    {
        int subjectID;
        decimal maximumScore;
        string nameOfSubject;

        public SubjectModel()
        {
            MaximumScore = 0;
            SubjectID = 0;
            NameOfSubject = "";
        }

        public SubjectModel(int newsubjectID, string newNameofsubject, decimal newMaximumScore) 
        {
            MaximumScore = newMaximumScore;
            SubjectID = newsubjectID;
            NameOfSubject = newNameofsubject;
        }
        
        public decimal MaximumScore
        {
            get { return this.maximumScore; }

            set
            {
                if (value != this.maximumScore)
                {
                    this.maximumScore = value;
                    NotifyPropertyChanged("MaximumScore");
                }
            }
        }

        public int SubjectID
        {
            get { return this.subjectID; }

            set
            {
                if (value != this.subjectID)
                {
                    this.subjectID = value;
                    NotifyPropertyChanged("SubjectID");
                }
            }
        }

        public string NameOfSubject
        {
            get { return this.nameOfSubject; }

            set
            {
                if (value != this.nameOfSubject)
                {
                    this.nameOfSubject = value;
                    NotifyPropertyChanged("NameOfSubject");
                }
            }
        }

        public override void Reset()
        {
            MaximumScore = 0;
            SubjectID = 0;
            NameOfSubject = "";
        }
    }
}
